home *** CD-ROM | disk | FTP | other *** search
- #ifndef GOLDED_CONFIG_H
- #define GOLDED_CONFIG_H
- /*
- ** $Filename: fd/GoldED.h
- ** $Release: 6
- **
- ** GoldED includes
- **
- ** (C) Copyright 1996 Dietmar Eilert
- ** All Rights Reserved
- */
-
- #ifndef EXEC_TYPES_H
- #include <exec/types.h>
- #endif
-
- #ifndef EXEC_LISTS_H
- #include <exec/lists.h>
- #endif
-
- #ifndef EXEC_LISTS_H
- #include <exec/lists.h>
- #endif
-
- #ifndef INTUITION_INTUITION_H
- #include <intuition/intuition.h>
- #endif
-
- #ifndef UTILITY_TAGITEM_H
- #include <utility/tagitem.h>
- #endif
-
- #ifndef WORKBENCH_WORKBENCH_H
- #include <workbench/workbench.h>
- #endif
-
- #ifndef REXX_STORAGE_H
- #include <rexx/storage.h>
- #endif
-
- /*
-
- Peferences of text buffer (suggest use: read-only); a pointer to this structure
- can be found in APIMessages: APIMessages->APIInstance->api_Environment.
-
- */
-
- struct EditConfig {
-
- struct Node Node; /* it's a linked list */
- ULONG Magic; /* useful to scan memory for this number */
- UBYTE Name[141]; /* document's name (symbolic) */
- UBYTE Path[141]; /* document's directory (symbolic) */
- BOOL ValidName; /* file named ? */
- BOOL ReadOnly; /* text is read-only */
- struct LineNode *TextNodes; /* pointer to 1st line's node */
- BOOL Folds; /* any folds ? */
- ULONG MaxLines; /* size of dynamic nodes array */
- ULONG Lines; /* number of lines (abs) */
- ULONG Line; /* current line number */
- UWORD Column; /* cursor x position (abs) */
- UWORD LastChangeColumn; /* column of last change */
- ULONG LastChangeLine; /* line of last change */
- UBYTE *CurrentBuffer; /* pointer to current line buffer */
- UWORD CurrentLen; /* bytes in buffer */
- UBYTE *UndoBuffer; /* pointer undo buffer */
- UWORD UndoLen; /* bytes in undo buffer */
- ULONG UndoLine; /* line number of undo buffer */
- BOOL LineModified; /* flag: line has been modified */
- BOOL DocModified; /* flag: buffer has been modified */
- UWORD Marker; /* marker mode */
- BOOL FlowMark; /* marker ink flow while moving ? */
- UWORD BlockStartX; /* block start */
- ULONG BlockStartY; /* block start */
- UWORD BlockEndX; /* block end */
- ULONG BlockEndY; /* block end */
- ULONG SearchLine; /* find start: line */
- UWORD SearchColumn; /* find start: column */
- ULONG Protection; /* protection bits */
- BOOL LineNotFixed; /* line-may-be-changed flag */
- UWORD BackupCounter; /* backup timer [min] */
- BOOL Preview; /* preview active ? */
- BOOL Frozen; /* text frozen ? */
- UBYTE Comment[80]; /* file comment */
- ULONG RememberY[10]; /* ping/pong jump marker */
- ULONG RememberX[10]; /* ping/pong jump marker */
-
- /* more private stuff follows */
- };
-
- /* marker modes */
-
- #define BLOCKMODE_NONE 0L
- #define BLOCKMODE_LINE 1L
- #define BLOCKMODE_CHAR 2L
-
- /* each line of a text is described by a line node */
-
- struct LineNode {
-
- UWORD Len; /* line's length */
- ULONG Line; /* locked line number */
- UBYTE *Text; /* pointer to text data */
- struct SpecialInfo *SpecialInfo; /* pointer to node extension */
- APTR UserData; /* syntax parser data */
- };
-
- /* node extensions are attached to line nodes to store special data */
-
- struct SpecialInfo {
-
- UWORD ID; /* extension ID (see below) */
-
- /* extension specific data follows */
- };
-
- #define EXTENSION_FOLD 0L /* fold */
- #define EXTENSION_BREAK 1L /* breakpoint */
-
- /* some useful macros */
-
- #define IS_FOLD(a) ((a)->SpecialInfo && ((a)->SpecialInfo->ID == EXTENSION_FOLD ))
- #define IS_BREAK(a) ((a)->SpecialInfo && ((a)->SpecialInfo->ID == EXTENSION_BREAK))
-
- #define GET_FOLD(a) (((a)->SpecialInfo && ((a)->SpecialInfo->ID == EXTENSION_FOLD )) ? ((struct Fold *)(a)->SpecialInfo) : NULL)
- #define GET_BREAKPOINT(a) (((a)->SpecialInfo && ((a)->SpecialInfo->ID == EXTENSION_BREAK)) ? ((struct Breakpoint *)(a)->SpecialInfo) : NULL)
-
- /* node extensions (extended SpecialInfo blocks) */
-
- struct Fold {
-
- UWORD ID; /* ID: NODE_EXTENSION_FOLD */
- ULONG Lines; /* lines within folded block */
- struct LineNode *TextNodes; /* pointer to node of 1st line */
- };
-
- struct BreakPoint {
-
- UWORD ID; /* ID: NODE_EXTENSION_BREAK */
- ULONG Line; /* absolute line number */
- UWORD State; /* current breakpoint state */
- };
-
-
- /* preferences of text windows (read-only); attached to Window->UserData */
-
- struct WindowSupportInfo {
-
- struct Node Node; /* it's a linked list */
- struct Window *Window; /* associated window */
- struct EditConfig *EditConfig; /* text buffer (if any) */
- UWORD Sleep; /* >0: show busy pointer */
- struct Menu *Menu; /* menu bar (if any) */
- struct Gadget *GadgetList; /* pointer to 1st gadget (if any) */
-
- /* handler (cleanup, server) */
-
- void (*CleanUp)(APTR);
- void (*Server )(struct Window *, UWORD, APTR);
-
- /* window dimensions */
-
- UWORD Type; /* window/server type */
- UWORD Left; /* window position */
- UWORD Top; /* window position */
- UWORD Width; /* window size */
- UWORD Height; /* window size */
-
- /* scaling information */
-
- UWORD FontX; /* scaling information: font width */
- UWORD FontY; /* scaling information: font height */
- struct TextAttr *FontAttr; /* scaling information: font */
- UWORD OffX; /* scaling information: x-offset */
- UWORD OffY; /* scaling information: y-offset */
-
- /* more private stuff follows */
- };
-
-
- /*
-
- API clients designed for GoldED pass modification requests to GoldED in order to
- edit the current text without using the ARexx interface. API modification requests
- are attached to APIMessage structures (APIOrder slot).
-
- */
-
- struct APIModifyRequest {
-
- ULONG mr_Line; /* cursor line */
- UWORD mr_Column; /* cursor column */
- UBYTE *mr_Data; /* modification request: data (cursor movement only if NULL) */
- UWORD mr_Size; /* modification request: bytes */
- };
-
- #endif
-